﻿@{
    ViewBag.Title = "ChooseCities";
    string Country1 = ViewBag.FirstCountry;
    string City1 = ViewBag.FirstCity;
    string Country2 = ViewBag.SecondCountry;
}


<h2>Please Choose 2 Locations</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Location 1</legend>

        <h4>Country: @ViewBag.FirstCountry</h4>
        <h4>City: @ViewBag.FirstCity</h4>
        @Html.Hidden("FirstCountry", (object)Country1)
        @Html.Hidden("FirstCity", (object)City1)

    </fieldset>
    
    <fieldset>
        <legend>Location 2</legend>

        <h4>Country: @ViewBag.SecondCountry</h4>
        @Html.Hidden("SecondCountry", (object)Country2)
        <div class="editor-field">
            <b>City</b> @Html.DropDownList("SecondCity") 
        </div>

        <p>
            <input type="submit" value="Calculate Distance" />
        </p>

        
    </fieldset>
}

<div>
    @Html.ActionLink("Back to Start", "Insert1", "Distance")
</div>


